package Crist;

import dominio.Graph;

/**
 * Clase interfaz entre el dominio y el algoritmo de Cristofides
 *
 * @author      Javier Gárate
 */
public class CristControler {
	private Integer[] ListadeNodos;
	private Graph Grafo;
	private double cost;
	
	public CristControler (Graph g) {
		ListadeNodos = new Integer[g.GetNumberNodes()];
		Grafo = new  Graph(g);
		cost = 0;
	}

	public void Calculate(){
		Christofides a = new Christofides(false);
		ListadeNodos = a.solve(Grafo);
		cost = a.getCost();
	}

	public Integer[] getLista() {
		return ListadeNodos;
	}
	
	public double getCost() {
		return cost;
	}
}
